package ar.com.personalTravellers.beans;

import com.angel.arquitectura.model.common.PersistentObject;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

@Entity
public class Comment extends PersistentObject {

    private String comment;

    @Enumerated(value = EnumType.STRING)
    private CommentType commentType;

    public Comment() {
        super();
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public CommentType getCommentType() {
        return commentType;
    }

    public void setCommentType(CommentType commentType) {
        this.commentType = commentType;
    }

    public Long length(){
        return this.comment != null ? Long.valueOf(String.valueOf(this.comment.length())) : new Long(0);
    }
}